//
//  HWBookShelfManager.m
//  嗨文
//
//  Created by 响当当 on 4/24/19.
//  Copyright © 2019 dongzheng. All rights reserved.
//

#import "HWBookShelfManager.h"

@implementation HWBookShelfManager
/**
 *   初始化
 */
+ (HWBookShelfManager *_Nonnull)manager
{
    static HWBookShelfManager *manager = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (!manager) {
            manager = [[HWBookShelfManager alloc]init];
        }
    });
    return manager;
}

/**
 *   嗨书架 1.access_token
 */
- (void)getBookShelfInfo:(NSDictionary *_Nonnull)prarmers sucess:(void(^_Nullable)(id _Nonnull acceptData))sucess fail:(nonnull void(^)( NSError * _Nullable error))fail
{
    [NetWorkingManager postRequestUrl:FULL_WEB_URL(KAPI_BOOKSHELF) withPramater:prarmers sucess:^(id responseObject) {
        NSDictionary *dic = responseObject[@"data"];
        sucess(dic);
    } failure:^(NSError *error) {
        fail(error);
    }];
}
@end
